package edu.umd.ion.wavemeter.service;

import com.google.gwt.user.client.rpc.IsSerializable;
import java.util.Vector;

/**
 * Data class containing the poll request of the client sent to the server
 * @author monroe-lab
 *
 */
public class WavemeterDataMask implements IsSerializable {
	/**
	 *  timestamp of the last measurement set received. To save bandwidth
	 *  and wait for a new measurement set.
	 */
	public int SpinAroundTime=0;
	
	/**
	 *  List of pattern requests. Holds the Pattern Requests or null if
	 *  no patterns are requested.
	 */
	public Vector<PatternRequest> PatternRequestList;	
	
	/**
	 *  Clears the PatternRequestList if it is not null.
	 */
	public void clearPatternRequest()
	{
		if (PatternRequestList!=null)
			PatternRequestList.clear();		
	}
	
	/**
	 * Adds a PatternRequest to the list.
	 * @param Request
	 */
	public void addPatternRequest(PatternRequest Request)
	{
		if (PatternRequestList==null)
			PatternRequestList = new Vector<PatternRequest>();
		PatternRequestList.add(Request);
	}
}
